﻿@inject DemoConfiguration Configuration
@inject NavigationManager navigationManager

<div class="demo-page">
    <div class="demo-page-content" style="@((Configuration.ShowOnlyReporting || isReportsPage()) ? "max-width: 100%" : "")">
        @ChildContent
    </div>
    <DemoPageNavPanel />
</div>

@code {
    [Parameter] public RenderFragment ChildContent { get; set; }

    bool isReportsPage() {
        return
            navigationManager.Uri.Contains("DocumentViewer") ||
            navigationManager.Uri.EndsWith("ReportDesigner");
    }

}
